'\" te
.\"  Copyright (c) 1990, 1995 by Mortice Kern Systems Inc.  All Rights Reserved  Portions Copyright (c) 1996, Sun Microsystems, Inc.  All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH INSNSTR 3XCURSES "Jun 5, 2002"
.SH NAME
insnstr, insstr, mvinsnstr, mvinsstr, mvwinsnstr, mvwinsstr, winsnstr, winsstr
\- insert a multibyte character string
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-I\fR /usr/xpg4/include \fB -L \fR /usr/xpg4/lib \e
\fB -R \fR /usr/xpg4/lib \fB -lcurses \fR [ \fIlibrary\fR... ]

\fBc89\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lcurses\fR [ \fIlibrary\fR... ]

#include <curses.h>

\fBint\fR \fBinsnstr\fR(\fBconst char *\fR\fIstr\fR, \fBint\fR \fIn\fR);
.fi

.LP
.nf
\fBint\fR \fBinsstr\fR(\fBconst char *\fR\fIstr\fR);
.fi

.LP
.nf
\fBint\fR \fBmvinsnstr\fR(\fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBconst char *\fR\fIstr\fR, \fBint\fR \fIn\fR);
.fi

.LP
.nf
\fBint\fR \fBmvinsstr\fR(\fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBconst char *\fR\fIstr\fR);
.fi

.LP
.nf
\fBint\fR \fBmvwinsnstr\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBconst char *\fR\fIstr\fR, \fBint\fR \fIn\fR);
.fi

.LP
.nf
\fBint\fR \fBmvwinsstr\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBconst char *\fR\fIstr\fR);
.fi

.LP
.nf
\fBint\fR \fBwinsnstr\fR(\fBWINDOW *\fR\fIwin\fR, \fBconst char *\fR\fIstr\fR, \fBint\fR \fIn\fR);
.fi

.LP
.nf
\fBint\fR \fBwinsstr\fR(\fBWINDOW *\fR\fIwin\fR, \fBconst char *\fR\fIstr\fR);
.fi

.SH PARAMETERS
.sp
.ne 2
.na
\fB\fIstr\fR\fR
.ad
.RS 7n
Is a pointer to the string to be inserted.
.RE

.sp
.ne 2
.na
\fB\fIn\fR\fR
.ad
.RS 7n
Is the number of characters not to exceed when inserting \fIstr\fR.   If
\fIn\fR is less than 1, the entire string is inserted.
.RE

.sp
.ne 2
.na
\fB\fIy\fR\fR
.ad
.RS 7n
Is the y (row) coordinate of the starting position of the string.
.RE

.sp
.ne 2
.na
\fB\fIx\fR\fR
.ad
.RS 7n
Is the x (column) coordinate of the starting position of the string.
.RE

.sp
.ne 2
.na
\fB\fIwin\fR\fR
.ad
.RS 7n
Is a pointer to the window in which the string is to be inserted.
.RE

.SH DESCRIPTION
.sp
.LP
The \fBinsstr()\fR function inserts \fIstr\fR at the current cursor position
of the \fBstdscr\fR window. The \fBwinsstr()\fR function performs the identical
action, but in window  \fIwin\fR.  The \fBmvinsstr()\fR and \fBmvwinsstr()\fR
functions insert the character  string at the starting position indicated by
the \fIx\fR (column) and \fIy\fR  (row) parameters (the former to the
\fBstdscr\fR window; the latter to window \fIwin\fR).
.sp
.LP
The \fBinsnstr()\fR, \fBwinsnstr()\fR, \fBmvinsnstr()\fR, and
\fBmvwinsnstr()\fR functions insert \fIn\fR characters to the window or as
many as will fit on the line. If \fIn\fR is less than 1, the entire string is
inserted or as much of it as  fits on the line.  The former two functions place
the string at the current cursor position; the  latter two commands use the
position specified by the \fIx\fR and \fIy\fR parameters.
.sp
.LP
All characters to the right of inserted characters are moved to the right.
Characters that don't fit on the current line are discarded. The cursor is left
at the point of insertion.
.sp
.LP
If a character in \fIstr\fR is a newline, carriage return, backspace, or tab,
the cursor is moved appropriately.  The cursor is moved to the next tab stop
for each tab character (by default, tabs are eight characters apart). If the
character is a control character other than those previously mentioned, the
character is inserted using \fB^\fR\fIx\fR notation, where \fIx\fR is a
printable character.  \fBclrtoeol\fR(3XCURSES) is automatically done before a
newline.
.SH RETURN VALUES
.sp
.LP
On success, these functions return \fBOK\fR. Otherwise, they return \fBERR\fR.
.SH ERRORS
.sp
.LP
None.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Standard
_
MT-Level	Unsafe
.TE

.SH SEE ALSO
.sp
.LP
.BR addchstr (3XCURSES),
.BR addstr (3XCURSES),
.BR clrtoeol (3XCURSES),
.BR ins_nwstr (3XCURSES),
.BR insch (3XCURSES),
.BR libcurses (3XCURSES),
.BR attributes (7),
.BR standards (7)
